web3.js@0.2x.x web3.net.listening
web3.net.listening
ใƒŽใƒผใƒ‰ใŒใƒใƒƒใƒˆใƒฏใƒผใ‚ฏๆŽฅ็ถš็Šถๆณใ‚’่ƒฝๅ‹•็š„ใซ็ขบ่ชใ—ใฆใ„ใ‚‹ใ‹ใฉใ†ใ‹ใฎ็Šถๆ…‹ใ‚’่ฟ”ใ—ใพใ™ใ€‚
ใ“ใฎใƒ—ใƒญใƒ‘ใƒ†ใ‚ฃใฏ่ชญใฟๅ–ใ‚Šๅฐ‚็”จใงใ™ใ€‚
้žๅŒๆœŸใฎๅ ดๅˆ
web3.net.getListening(callback(error, result){ ... })
ๆˆปใ‚Šๅ€ค
Boolean
ใƒŽใƒผใƒ‰ใŒใƒใƒƒใƒˆใƒฏใƒผใ‚ฏๆŽฅ็ถš็Šถๆณใ‚’่ƒฝๅ‹•็š„ใซ็ขบ่ชใ—ใฆใ„ใ‚‹ๅ ดๅˆ true ใ‚’่ฟ”ใ—ใพใ™ใ€‚
ใ‚ตใƒณใƒ—ใƒซใ‚ณใƒผใƒ‰
code:example.js
var isAddress = web3.isAddress("0x8888f1f195afa192cfee860698584c030f4c9db1");
console.log(isAddress); // true
ๅ‚่€ƒ
https://github.com/ethereum/wiki/wiki/JavaScript-API#web3netlistening
#web3.js@0.2x.x #web3.js